package com.gedeshidai.shumadevelop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gedeshidai.shumadevelop.model.dto.product.GoodsSalesDTO;
import com.gedeshidai.shumadevelop.model.entity.Product;
import com.gedeshidai.shumadevelop.model.entity.User;
import com.gedeshidai.shumadevelop.model.vo.ProductPreviewVO;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

public interface ReportMapper extends BaseMapper<User> {
    /**
     *根据动态条件统计总销量数据
     * @param map
     * @return
     */
    Integer sumByMap(Map map);

    /**
     * 统计指定时间内销量排名
     * @param map
     * @return
     */
    List<GoodsSalesDTO> getSalesTop20(Map map);
    /**
     * 兑换方式的数量,1、纯积分,2、积分加钱,3、现金
     * @param map
     * @return
     */
     Integer getNumberType1(Map map);
    Integer getNumberType2(Map map);
    Integer getNumberType3(Map map);

}
